The present invention relates to the field of computer graphics, and in particular to methods and apparatus for assigning attribute values to surfaces of computer graphics models. Many computer graphic images are created by mathematically modeling the interaction of light with a three dimensional scene from a given viewpoint. This process, called rendering, generates a two-dimensional image of the scene from the given viewpoint, and is analogous to taking a photograph of a real-world scene. Animated sequences can be created by rendering a sequence of images of a scene as the scene is gradually changed over time. A great deal of effort has been devoted to making realistic looking rendered images and animations.
Many rendering effects are performed by sampling a three-dimensional scene at discrete points. The renderer determines one or more attribute values, such as color, transparency, or depth, for the sample of the three-dimensional scene. The attribute values of one or more samples of the three-dimensional scene are then combined to determine the value of a pixel of the rendered image.
For example, a renderer may trace sample rays into a three-dimensional scene (or project geometry on to an image plane) to render geometry. The intersection of a sampling ray and geometry (or an image sample point in the image plane and the projected geometry) defines a sample of the three-dimensional scene used to determine the value of a pixel of the rendered image. Additionally, illumination, shadowing, scattering, depth of field, motion blur, reflection, and refraction effects are created by casting additional sample rays from an intersected portion of scene geometry into further portions of the three-dimensional scene.
Many visual effects may require multiple samples of the scene data for each image pixel to be effective. For example, reflection effects may require tens or even hundreds of samples to achieve visually accurate results. Undersampling, or using too few samples, can result in unwanted visual artifacts such as aliasing and low detail. However, sampling a three-dimensional scene through ray tracing or other techniques is time consuming and computationally expensive. Thus, reducing the number of samples required by a renderer to produce an accurate and aesthetically-pleasing image can produce enormous gains in performance.